package domain.entities;

import javax.persistence.*;
import java.util.Collections;
import java.util.Date;
import java.util.LinkedHashMap;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Protocolinformation entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "protocolinformation", catalog = "bms")
public class Protocolinformation implements java.io.Serializable {

	// Fields
	private Integer id;
    private ProtocoloCentro protocoloCentro;
	private Date acknowledgementPageSigned;
	private Date cartaAnmat;
	private Date approvalCcis;
	private Date approvalMoh;
    private Date approvedExternalEc;
    private Date approvedLocalEc;
	private Date approvedTc;
	private Date cartaNoVotoLocalEc;
	private Date cartaNoVotoTc;
	private Date coeis;
	private Date dated;
    private String description;
    private String version;
    private String comments;
    private Date approvalExpirationEc;
    private Date expirationDateTc;
    private Date expirationDate;
    private boolean partOfInitialPackage;
	private Date readyForImplementation;
	private Date receivedBms;
	private Date sentToCcis;
    private Date sentToCentralEc;
    private Date sentToExternalEc;
    private Date sentToLocalEc;
	private Date sentToMoh;
	private Date sentToSite;
	private Date sentToTc;
    private Integer scope;

    public static final String CLASSTITLE = "Protocol Information";
    public static final LinkedHashMap<String, String> TITULOS = new LinkedHashMap<String, String>(
            Collections.unmodifiableMap(
                    new LinkedHashMap<String, String>() {
                        {
                            put("description", "Name");
                            put("version", "Version");
                            put("comments", "Comments");
                            put("dated", "Dated");
                            put("receivedBms", "Received BMS");
                            put("sentToSite", "Sent to Site");
                            put("partOfInitialPackage", "Is Part of the Initial Package?");
                            put("sentToExternalEc", "Sent to External EC");
                            put("approvedExternalEc", "Approved/Notified External EC");
                            put("approvalExpirationEc", "Approval Expiration date (if applicable)");
                            put("sentToLocalEc", "Sent to Local EC");
                            put("approvedLocalEc", "Approved/Notified Local EC");
                            put("cartaNoVotoLocalEc", "Carta de no voto (si aplicara)");
                            put("expirationDateTc", "Expiration Date (if applicable)");
                            put("sentToTc", "Sent to Teaching Committee");
                            put("approvedTc", "Approved/Notified Teaching Committee");
                            put("cartaNoVotoTc", "Carta de no voto (si aplicara)");
                            put("expirationDate", "Expiration Date");
                            put("coeis", "COEIS");
                            put("acknowledgementPageSigned", "Study or Amendment Acknowledgment page signed(PI)");
                            put("cartaAnmat", "ANMAT Amendment acknowledgment");
                            put("sentToCcis", "Sent to CCIS");
                            put("approvalCcis", "CCIS Approval");
                            put("sentToMoh", "Sent to MOH");
                            put("approvalMoh", "MOH approved/notified");
                            put("readyForImplementation", "Ready for site implementation");
                        }
                    }
            )
    );


    // Constructors

	/** default constructor */
	public Protocolinformation() {
	}

	/** minimal constructor */
	public Protocolinformation(ProtocoloCentro protocoloCentro,
			String description) {
		this.protocoloCentro = protocoloCentro;
		this.description = description;
	}

	/** full constructor */
	public Protocolinformation(ProtocoloCentro protocoloCentro,
                               Date acknowledgementPageSigned, Date cartaAnmat, Date approvalCcis,
                               Date approvalMoh, Date approvedCentralEc, Date approvedLocalEc,
                               Date approvedTc, Date cartaNoVotoEc, Date cartaNoVotoTc,
                               Date coeis, Date dated, String description, Date expirationDateEc,
                               Date expirationDateTc, Date expirationDate, Date readyForImplementation,
                               Date receivedBms, Date sentToCcis, Date sentToCentralEc,
                               Date sentToLocalEc, Date sentToMoh, Date sentToSite, Date sentToTc) {
		this.protocoloCentro = protocoloCentro;
		this.acknowledgementPageSigned = acknowledgementPageSigned;
		this.cartaAnmat = cartaAnmat;
		this.approvalCcis = approvalCcis;
		this.approvalMoh = approvalMoh;
        this.approvedLocalEc = approvedLocalEc;
		this.approvedTc = approvedTc;
		this.cartaNoVotoLocalEc = cartaNoVotoEc;
		this.cartaNoVotoTc = cartaNoVotoTc;
		this.coeis = coeis;
		this.dated = dated;
		this.description = description;
		this.approvalExpirationEc = expirationDateEc;
		this.expirationDateTc = expirationDateTc;
        this.expirationDate = expirationDate;
        this.readyForImplementation = readyForImplementation;
		this.receivedBms = receivedBms;
		this.sentToCcis = sentToCcis;
		this.sentToCentralEc = sentToCentralEc;
		this.sentToLocalEc = sentToLocalEc;
		this.sentToMoh = sentToMoh;
		this.sentToSite = sentToSite;
		this.sentToTc = sentToTc;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns( {
			@JoinColumn(name = "PROTOCOLO_CENTROCENTROid", referencedColumnName = "CENTROid", nullable = false),
			@JoinColumn(name = "protocolo_centroprotocolo_compromisopaisprotocoloid", referencedColumnName = "protocolo_compromisopaisprotocoloid", nullable = false),
			@JoinColumn(name = "protocolo_centroprotocolo_compromisopaiscompromisopaisid", referencedColumnName = "protocolo_compromisopaiscompromisopaisid", nullable = false) })
	public ProtocoloCentro getProtocoloCentro() {
		return this.protocoloCentro;
	}

	public void setProtocoloCentro(ProtocoloCentro protocoloCentro) {
		this.protocoloCentro = protocoloCentro;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "acknowledgementPageSigned", length = 10)
	public Date getAcknowledgementPageSigned() {
		return this.acknowledgementPageSigned;
	}

	public void setAcknowledgementPageSigned(Date acknowledgementPageSigned) {
		this.acknowledgementPageSigned = acknowledgementPageSigned;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "ANMAT", length = 10)
	public Date getCartaAnmat() {
		return this.cartaAnmat;
	}

	public void setCartaAnmat(Date cartaAnmat) {
		this.cartaAnmat = cartaAnmat;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "approvalCCIS", length = 10)
	public Date getApprovalCcis() {
		return this.approvalCcis;
	}

	public void setApprovalCcis(Date approvalCcis) {
		this.approvalCcis = approvalCcis;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "approvalMOH", length = 10)
	public Date getApprovalMoh() {
		return this.approvalMoh;
	}

	public void setApprovalMoh(Date approvalMoh) {
		this.approvalMoh = approvalMoh;
	}

    @Temporal(TemporalType.DATE)
	@Column(name = "approvedLocalEC", length = 10)
	public Date getApprovedLocalEc() {
		return this.approvedLocalEc;
	}

	public void setApprovedLocalEc(Date approvedLocalEc) {
		this.approvedLocalEc = approvedLocalEc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "approvedTC", length = 10)
	public Date getApprovedTc() {
		return this.approvedTc;
	}

	public void setApprovedTc(Date approvedTc) {
		this.approvedTc = approvedTc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "cartaNoVotoEC", length = 10)
	public Date getCartaNoVotoLocalEc() {
		return this.cartaNoVotoLocalEc;
	}

	public void setCartaNoVotoLocalEc(Date cartaNoVotoLocalEc) {
		this.cartaNoVotoLocalEc = cartaNoVotoLocalEc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "cartaNoVotoTC", length = 10)
	public Date getCartaNoVotoTc() {
		return this.cartaNoVotoTc;
	}

	public void setCartaNoVotoTc(Date cartaNoVotoTc) {
		this.cartaNoVotoTc = cartaNoVotoTc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "COEIS", length = 10)
	public Date getCoeis() {
		return this.coeis;
	}

	public void setCoeis(Date coeis) {
		this.coeis = coeis;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "dated", length = 10)
	public Date getDated() {
		return this.dated;
	}

	public void setDated(Date dated) {
		this.dated = dated;
	}

    @Column(name = "description", nullable = false)
    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Column(name = "version", nullable = false)
    public String getVersion() {
        return this.version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    @Temporal(TemporalType.DATE)
	@Column(name = "expirationDateEC", length = 10)
	public Date getApprovalExpirationEc() {
		return this.approvalExpirationEc;
	}

	public void setApprovalExpirationEc(Date approvalExpirationEc) {
		this.approvalExpirationEc = approvalExpirationEc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "expirationDateTC", length = 10)
	public Date getExpirationDateTc() {
		return this.expirationDateTc;
	}

	public void setExpirationDateTc(Date expirationDateTc) {
		this.expirationDateTc = expirationDateTc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "readyForImplementation", length = 10)
	public Date getReadyForImplementation() {
		return this.readyForImplementation;
	}

	public void setReadyForImplementation(Date readyForImplementation) {
		this.readyForImplementation = readyForImplementation;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "receivedBMS", length = 10)
	public Date getReceivedBms() {
		return this.receivedBms;
	}

	public void setReceivedBms(Date receivedBms) {
		this.receivedBms = receivedBms;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "sentToCCIS", length = 10)
	public Date getSentToCcis() {
		return this.sentToCcis;
	}

	public void setSentToCcis(Date sentToCcis) {
		this.sentToCcis = sentToCcis;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "sentToCentralEC", length = 10)
	public Date getSentToCentralEc() {
		return this.sentToCentralEc;
	}

	public void setSentToCentralEc(Date sentToCentralEc) {
		this.sentToCentralEc = sentToCentralEc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "sentToLocalEC", length = 10)
	public Date getSentToLocalEc() {
		return this.sentToLocalEc;
	}

	public void setSentToLocalEc(Date sentToLocalEc) {
		this.sentToLocalEc = sentToLocalEc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "sentToMOH", length = 10)
	public Date getSentToMoh() {
		return this.sentToMoh;
	}

	public void setSentToMoh(Date sentToMoh) {
		this.sentToMoh = sentToMoh;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "sentToSite", length = 10)
	public Date getSentToSite() {
		return this.sentToSite;
	}

	public void setSentToSite(Date sentToSite) {
		this.sentToSite = sentToSite;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "sentToTC", length = 10)
	public Date getSentToTc() {
		return this.sentToTc;
	}

	public void setSentToTc(Date sentToTc) {
		this.sentToTc = sentToTc;
	}

    @Column(name = "isPartOfInitialPackage")
    public boolean isPartOfInitialPackage() {
        return partOfInitialPackage;
    }

    public void setPartOfInitialPackage(boolean partOfInitialPackage) {
        this.partOfInitialPackage = partOfInitialPackage;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "sentToExternalEC", length = 10)
    public Date getSentToExternalEc() {
        return sentToExternalEc;
    }

    public void setSentToExternalEc(Date sentToExternalEc) {
        this.sentToExternalEc = sentToExternalEc;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "approvedExternalEC", length = 10)
    public Date getApprovedExternalEc() {
        return approvedExternalEc;
    }

    public void setApprovedExternalEc(Date approvedExternalEc) {
        this.approvedExternalEc = approvedExternalEc;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "expirationDate", length = 10)
    public Date getExpirationDate() {
        return expirationDate;
    }

    public void setExpirationDate(Date expirationDate) {
        this.expirationDate = expirationDate;
    }

    @Column(name = "comments")
    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    @Column(name = "scope")
    public Integer getScope() {
        return scope;
    }

    public void setScope(Integer scope) {
        this.scope = scope;
    }

}